Start with two initial guesses, x0 and x1, for the root of the function f(x) = 0. These guesses should be relatively close to the actual root.
Calculate the next approximation xn+1 using the formula:
xn+1 = xn - f(xn)⋅(xn - xn-1) / (f(xn) - f(xn-1))
In each iteration, xn-1 becomes xn and xn becomes xn+1.
Calculate the absolute error, ε, as ε = |xn+1 - xn|. If ε is smaller than a predefined tolerance or if a maximum number of iterations is reached, stop. Otherwise, go back to Step 2 with xn+1 as the new approximation.
The final xn+1 is an approximation of the root of the function (f(x) = 0).
The Secant Method is an iterative approach for finding the root of an equation. It doesn't require knowledge of the derivative of the function, making it more versatile than methods like the Newton-Raphson method.